from tkinter import *
import tkinter as tk
from Logic.create_card_dialog import create_card_dialog_func


def create_main_window_func():
    window = tk.Tk()
    window.title("To Do List")
    window.geometry("800x600")

    # 创建列和框架
    columns = ["To_Do", "In Progress", "Done"]
    frames = {}
    for col in columns:
        frame = tk.Frame(window, relief=tk.RAISED, borderwidth=1)
        frame.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
        frames[col] = frame
        label = tk.Label(frame, text=col, bg='lightblue', font=('Arial', 12, 'bold'))
        label.pack(fill=tk.X)

    # 创建添加任务按钮
    button = tk.Button(window, text="Create", command = create_card_dialog_func)
    button.pack()

    return window
